// import { useNavigate } from "react-router-dom";
import { store } from "../../redux"
import { setUserInfoAction, setTokenAction } from '../../redux/modules/auth/action'

// 首页的路劲
export const home_path = '/index'
export const filterRouter = ['/404'] // 导航栏中过滤掉一些不必要的菜单

export const logout = () => {
  console.log('log out')
  store.dispatch(setUserInfoAction({})) // 清除用户信息
  store.dispatch(setTokenAction('')) // 清除token
  window.location.pathname = '/'
}